import { http } from '@/utils/http/axios';

/**
 * 服务商列表
 */
export function siteList(params) {
  return http.request({
    url: '/api/site/v2/list',
    method: 'GET',
    params,
  });
}

/**
 * 新增服务商
 */
export function siteAdd(data) {
  return http.request({
    url: '/api/site/v2/add',
    method: 'POST',
    data,
  });
}

/**
 * 服务商编辑提交
 */
export function siteUpdateAction(data) {
  return http.request({
    url: '/api/site/v2/update_action',
    method: 'POST',
    data,
  });
}

/**
 * 服务商编辑/详情
 */
export function siteInfo(params) {
  return http.request({
    url: '/api/site/v2/info',
    method: 'GET',
    params,
  });
}

/**
 * 销售select列表
 */
export function siteSaleSelect() {
  return http.request({
    url: '/api/site/sale/select',
    method: 'GET',
  });
}

/**
 * 列表
 */
export function siteCustomerLists(params) {
  return http.request({
    url: '/api/site/customer/lists',
    method: 'GET',
    params,
  });
}

/**
 * 文件流
 */
export function siteAuthCode(data) {
  return http.request({
    url: '/api/site/auth_code',
    method: 'POST',
    data,
    responseType: 'blob',
  });
}

/**
 * 跳转
 */
export function skipOut(params) {
  return http.request({
    url: '/api/site/v2/location_site',
    method: 'GET',
    params,
  });
}
/**
 * 删除
 */
export function deleteSite(data) {
  return http.request({
    url: '/api/site/v2/delete',
    method: 'POST',
    data,
  });
}
/**
 * 数据大屏开关
 */
export function siteConfigAdd(data) {
  return http.request({
    url: '/api/site_config/add',
    method: 'POST',
    data,
  });
}
/**
 * 直播列表
 */
export function site_live_room(params) {
  return http.request({
    url: '/api/site/v2/live_room',
    method: 'GET',
    params,
  });
}
